Class SnmpAgentImpl

All Implemented Interfaces:
IPCObject, Process, SnmpAgent

public class SnmpAgentImpl extends ProcessImpl implements SnmpAgent
Information provided by the PKI file:

    \class SnmpAgent
    
    \brief SnmpAgent holds and manipulates the SNMP agent.
    
    \example network().getDevice("Router0").getProcess("SnmpAgent")
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • getCommunity

      public Pair<String,Access> getCommunity(String community)
      Information provided by the PKI file:
      
          \brief Returns the community with the specified name.
          
          \param community, the name of the community of interest.
          
          \return pair<string, Access, the community name and access privileges.
          Access privileges:  eAccess_ReadOnly = 0,
          eAccess_ReadWrite = 1,
          eAccess_ReadCreate = 2,
          eAccess_NotAccessible = 3
          
              
      Specified by:
      getCommunity in interface SnmpAgent
      Parameters:
      community - Takes in a parameter of community
      Returns:
      Pair<String, Access> Returns a Pair<String, Access>
    • getCommunityAt

      public Pair<String,Access> getCommunityAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the community at the specified name.
          
          \param index, the index of the community of interest.
          
          \return pair<string, Access, the community name and access privileges.
          Access privileges:  eAccess_ReadOnly = 0,
          eAccess_ReadWrite = 1,
          eAccess_ReadCreate = 2,
          eAccess_NotAccessible = 3
          
              
      Specified by:
      getCommunityAt in interface SnmpAgent
      Parameters:
      index - Takes in a parameter of index
      Returns:
      Pair<String, Access> Returns a Pair<String, Access>
    • removeCommunity

      public boolean removeCommunity(String communityStr)
      Information provided by the PKI file:
      
          \brief Removes the specified community.
          
          \param communityStr, the name of the community of interest.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      removeCommunity in interface SnmpAgent
      Parameters:
      communityStr - Takes in a parameter of communityStr
      Returns:
      boolean Returns a boolean
    • addCommunity

      public void addCommunity(String communityStr, Access access)
      Information provided by the PKI file:
      
          \brief Adds a community.
          
          \param communityStr, the name of the community.
          \param access,      the community name and access privileges.
          Access privileges:  eAccess_ReadOnly = 0,
          eAccess_ReadWrite = 1,
          eAccess_ReadCreate = 2,
          eAccess_NotAccessible = 3
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      addCommunity in interface SnmpAgent
      Parameters:
      communityStr - Takes in a parameter of communityStr
      access - Takes in a parameter of access
    • getCommunityCount

      public int getCommunityCount()
      Information provided by the PKI file:
      
          \brief Returns the number of communities.
          
          \return int, the number of communities.
          
              
      Specified by:
      getCommunityCount in interface SnmpAgent
      Returns:
      int Returns a int
    • isEnabled

      public boolean isEnabled()
      Information provided by the PKI file:
      
          \brief Returns true if the SNMP agent is enabled, otherwise false.
          
          \return bool, true if the SNMP agent is enabled, otherwise false.
          
              
      Specified by:
      isEnabled in interface SnmpAgent
      Returns:
      boolean Returns a boolean
    • setEnabled

      public void setEnabled(boolean enabled)
      Information provided by the PKI file:
      
          \brief Enables or disables the SNMP agent.
          
          \return enabled, true to enable the SNMP agent, false to disable it.
          
              
      Specified by:
      setEnabled in interface SnmpAgent
      Parameters:
      enabled - Takes in a parameter of enabled